package com.ym9527.entity;


import lombok.Data;

import javax.persistence.*;
import java.util.Date;
import java.util.List;

//这是失物招领帖子数据实体类
@Entity()
@Data
@Table(name = "school_lost_and_found")
public class LostAndFoundRequest {

    //              Table 自增
    @TableGenerator(
            name="ID_GENERATOR",
            table="ID_GEN",
            pkColumnName = "GEN_NAME",
            pkColumnValue = "LOST_PK",
            valueColumnName = "GEN_VALUE",
            initialValue = 1,
            allocationSize = 1
    )
    @GeneratedValue(strategy= GenerationType.TABLE, generator="ID_GENERATOR")
    @Id
    @Column(name = "lost_id",length = 50)
    private Long  lostId;

    @Column(name = "create_user_id",length = 50)
    private Long  createUserId;


    @Transient
    private String  creatUserName;

    /**
     * 帖子类别  分为 寻物  和 招领
     */
    @Column(name = "type",length = 256)
    private String lostType;


    /**
     * 首页图片路径
     */
    @Column(name = "index_image_path",length = 256)
    private String IndexImgPath;




    /**
     * 帖子标题
     */
    @Column(name = "title",length = 256)
    private String title;

    /**
     * 帖子内容
     */
    @Column(name = "text",length = 256)
    private String text;

    /**
     * 帖子状态
     */
    @Column(name = "state",length = 256)
    private String state;

    /**
     * 这是帖子创建时间
     */
    @Column(name = "create_time")
    private Date createTime;

    /**
     * 这是帖子最后回复时间
     */
    @Column(name = "lost_message_time")
    private Date lostMessageTime;

    @Transient
    private List<String> images;

    @Transient
    private List<Long> imageIds;

    @Transient
    private List<ResponseMessage> messages;

    @Transient
    private List<Label> labels;

}
